﻿using BDShop.DAL;
using BDShop.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IsolationLevel = System.Transactions.IsolationLevel;

namespace BDShop.Business
{
    public class SupplierService
    {
        public static List<Supplier> GetListSupplierCacheModel()
        {
            List<Supplier> lstSupplier = new List<Supplier>();
            using (var context = new BDShopEntities(IsolationLevel.ReadUncommitted))
            {
                lstSupplier = context.Suppliers.Where(s => s.IsCommon == true).Take(5).ToList();
            }

            return lstSupplier;
        }
    }
}
